LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-19-2010, 10:22 PM   #1
M$ISBS
Member
 
Registered: Aug 2003
Posts: 834

Rep: Reputation: 30
How do I make a desktop shortcut in XFCE4 ?


I installed opera10 and I can start it from a shell script from the opera folder but when i try to make a desktop shortcut it does not work.
Either from xfce or by right clicking and choosing to send it to the desktop as a shortcut.

I did not install opera system wide, only under one user. Do I need to set some kind of path or link or something?
 
Old 06-20-2010, 08:52 AM   #2
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
Linux uses "desktop files" that contain the name of the program in different languages, the path to the icon, and the command to run, instead of links, to put program icons on the desktop.
 
Old 06-20-2010, 03:59 PM   #3
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Quote:
I did not install opera system wide, only under one user. Do I need to set some kind of path or link or something?
If you installed it only for one user (as that user), then it should not be made available to other users, so you are either trying to do the "wrong thing" or I have misunderstood your Q.

If you'd like opera to be available to all users, then install it as root, by using your package manager. Paths and links "will be taken care of"

Otherwise, try calling opera from a script. This is called "Wrapping it up". It's ugly, but often works.

Script startopera:
Code:
#!/bin/bash
cd /home/M$ISBS/wherever/opera
opera
Then make that script executable
Code:
chmod +x /path/to/startopera
Then call that script from your "desktop shortcut". Be sure to give the full path to the /home/M$ISBS/whatever/startopera script or it will probably fail.

[KDE 3.x handles this effortlessly. Sometimes linux takes three steps forwards, then one step back. Sigh.]
 
1 members found this post helpful.
Old 06-20-2010, 07:02 PM   #4
M$ISBS
Member
 
Registered: Aug 2003
Posts: 834

Original Poster
Rep: Reputation: 30
I would like an icon on the desktop to click on, instead of opening up the opera folder and clicking on the icon there.
When I drag the icon to the desktop, it shows up but does nothing when I double click on it. It says that its a link to a shell script.

It is a single user system.
 
Old 06-21-2010, 05:31 AM   #5
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Quote:
It says that its a link to a shell script.
Please post the contents of the shell script.

Edit:
You could find out what the errors are by running the script in a terminal:

Code:
cd /home/M$ISBS/Desktop
./nameoflinktoopera
/Edit

Last edited by tredegar; 06-21-2010 at 05:41 AM.
 
Old 06-21-2010, 08:33 PM   #6
M$ISBS
Member
 
Registered: Aug 2003
Posts: 834

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by tredegar View Post
Please post the contents of the shell script.

Edit:
You could find out what the errors are by running the script in a terminal:

Code:
cd /home/M$ISBS/Desktop
./nameoflinktoopera
/Edit
I did that and it says:
The Opera binary is not located at "usr/lib/opera/opera".
Please modify the wrapper script at "./opera".

It looks like the link is pointing to /usr/lib/opera/opera but the executable is not located there, its in the folder I downloaded it to.
What is a wrapper script?
 
Old 06-21-2010, 09:23 PM   #7
mryuck
Member
 
Registered: Feb 2010
Posts: 107

Rep: Reputation: 23
Did you try right clicking the desktop and selecting create launcher.
Put Opera where it says name.
The command should be opera.
 
Old 06-21-2010, 09:33 PM   #8
M$ISBS
Member
 
Registered: Aug 2003
Posts: 834

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by mryuck View Post
Did you try right clicking the desktop and selecting create launcher.
Put Opera where it says name.
The command should be opera.

Yes I did that a dozen times and it works with other programs, but not with opera.
It has something to do with opera not being installed globally but I dont know how to fix it. It looks like the link is pointing to the wrong location, Something like /usr/lib/opera Opera is actually located at /home/*****/download/opera

When I open up a console and type " ./opera " Opera starts up, (as long as I am in that directory) but in the shortcut icon It does not work.
 
Old 06-21-2010, 09:36 PM   #9
mryuck
Member
 
Registered: Feb 2010
Posts: 107

Rep: Reputation: 23
where it says command put the path /home/*****/download/opera.
 
Old 06-21-2010, 10:40 PM   #10
M$ISBS
Member
 
Registered: Aug 2003
Posts: 834

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by mryuck View Post
where it says command put the path /home/*****/download/opera.
Thats one of the first things I did and nothing happens when I click on the icon, It doesnt make sense. The only thing different is that I have to use ./opera in the console instead of just opera in the command path.

I tried ./opera in the command path of the icon and that does not work.
When I use ./opera in the terminal it works fine.
 
Old 06-21-2010, 10:49 PM   #11
mryuck
Member
 
Registered: Feb 2010
Posts: 107

Rep: Reputation: 23
is /home/*****/download/opera a directory?
you may need to put /home/*****/download/opera/opera.
./ is only needed when your in the directory the executable is in.
 
Old 06-21-2010, 10:55 PM   #12
M$ISBS
Member
 
Registered: Aug 2003
Posts: 834

Original Poster
Rep: Reputation: 30
I tried that as well with no luck, I dont get why this is not working.

Even when I drag the executable to the desktop it still wont work.
 
Old 06-21-2010, 10:58 PM   #13
mryuck
Member
 
Registered: Feb 2010
Posts: 107

Rep: Reputation: 23
Try checking the run in terminal box. See if it starts that way.
 
Old 06-21-2010, 11:12 PM   #14
M$ISBS
Member
 
Registered: Aug 2003
Posts: 834

Original Poster
Rep: Reputation: 30
When I do that, the terminal opens with nothing displayed and it just sits there.
I think I might have to uninstall opera, then reinstall it and see if that changes anything.
 
Old 06-21-2010, 11:20 PM   #15
mryuck
Member
 
Registered: Feb 2010
Posts: 107

Rep: Reputation: 23
exactly what do you have for a command in launcher?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I make a shortcut to my desktop on a eee pc Steve.Davies Linux - Newbie 1 08-04-2008 04:06 AM
How to make a shortcut for Mplayer on the desktop foxy123 Linux - Newbie 8 11-28-2004 06:37 PM
How to make shortcut for Gnome desktop? septanla Linux - Newbie 12 10-18-2003 04:05 AM
How to - to how to make a shortcut on desktop rberry88 Linux - Newbie 3 09-10-2003 10:20 PM
make shortcut in desktop in red hat 9 eyes_linux Linux - Newbie 6 08-03-2003 06:03 AM


All times are GMT -5. The time now is 07:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration