I want to run programs like vncviewer and open several instances. How can I create a desktop icon that will start programs? Like batch files in DOS.
For example now to start vncviewer i open terminal and type the command xvncviewer.
Thanks in advance.
How do you create a desktop icon to start a program
5 posts
Pi1>OS: Rasbian Pi2>OS:Xbian .63
1:HDMI>>DVI>>Flat Screen Monitor
2: HDMI>>Toshiba 37" LCD
1:ASUS Wired USB Keyboard and Mouse
2:Logitech wireless mouse, CEC remote
SanDisk SDHC C4 8GB SD
1:HDMI>>DVI>>Flat Screen Monitor
2: HDMI>>Toshiba 37" LCD
1:ASUS Wired USB Keyboard and Mouse
2:Logitech wireless mouse, CEC remote
SanDisk SDHC C4 8GB SD
I'm not at my Raspberry Pi at this moment, but if you right click the desktop, there should be an option for making a "launcher".
More easier, if it's multiple lines of code is to:
1) Open terminal
2) cd /home/pi/Desktop
3) nano [insertanamehere]
4) type up your commands, multiple lines are allowed (this is called bash scripting)
5) save by hitting control-x then a few other things
6) sudo chmod +x [thenameyouusedearlier]
7) Go to desktop
8) There should be a program you can double click on and that will launch
That's the way I would do it anyway.
More easier, if it's multiple lines of code is to:
1) Open terminal
2) cd /home/pi/Desktop
3) nano [insertanamehere]
4) type up your commands, multiple lines are allowed (this is called bash scripting)
5) save by hitting control-x then a few other things
6) sudo chmod +x [thenameyouusedearlier]
7) Go to desktop
8) There should be a program you can double click on and that will launch
That's the way I would do it anyway.
{sig} Setup: Original version Raspberry Pi (B, rev1, 256MB), Dell 2001FP monitor (1600x1200), 8GB Class 4 SD Card with Raspbian and XBMC, DD-WRT wireless bridge
- Posts: 514
- Joined: Wed Jan 25, 2012 9:06 pm
Works great thank you! 
Pi1>OS: Rasbian Pi2>OS:Xbian .63
1:HDMI>>DVI>>Flat Screen Monitor
2: HDMI>>Toshiba 37" LCD
1:ASUS Wired USB Keyboard and Mouse
2:Logitech wireless mouse, CEC remote
SanDisk SDHC C4 8GB SD
1:HDMI>>DVI>>Flat Screen Monitor
2: HDMI>>Toshiba 37" LCD
1:ASUS Wired USB Keyboard and Mouse
2:Logitech wireless mouse, CEC remote
SanDisk SDHC C4 8GB SD
Of course, the correct answer to the question posted in the Subject line is:
I don't.
I don't.
- Posts: 1387
- Joined: Sun Jan 15, 2012 1:11 pm
This issue seems to be resolved, however I'll post a bit about creating a desktop launcher for people who click on this thread with just that goal in mind. The solution given to the original post is to create a shell script, and that works, but for those who want "the thing that looks like the Firefox logo that i click on to get online" or the like, a desktop launcher is more suitable. The pros are that launchers have icons, shell scripts don't; however launchers execute one command, not like a bat file or a shell script which generally execute a list of commands in sequence. Both files are just the right kind of text file. a launcher is formatted as follows.
[Desktop Entry]
Name="the name that displays under the icon on the desktop"
Exec="a single command with or without arguments to execute on double click"
Icon="/path/to/some/128pxX128px.png"
Comment="If I'm here i show in properties tab or something"
there are more. but the first four lines usually do it, save your launcher as filename.desktop and it will work as expected and if not tweak it a little and try again.
[Desktop Entry]
Name="the name that displays under the icon on the desktop"
Exec="a single command with or without arguments to execute on double click"
Icon="/path/to/some/128pxX128px.png"
Comment="If I'm here i show in properties tab or something"
there are more. but the first four lines usually do it, save your launcher as filename.desktop and it will work as expected and if not tweak it a little and try again.
- Posts: 64
- Joined: Wed Jun 13, 2012 6:06 am