You are not logged in.
Hoy there, gang!
I am trying to set Skype to load once GNOME loads. I need to use the LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so work around to get my web cam working, but I have not been successful by adding that to the 'exec' portion of my skype.desktop file.
Any thoughts? Am I out of luck, and forced to use a manual Bash alias instead?
Offline
Have you tried adding it to your ~/.bashrc file..?
export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so
Offline
Sorry, I should have been more clear.
I do have it as an alias in Bash already
alias skype='LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype'
What I am hoping to do is to have it load automatically when Gnome loads, as opposed to having to open a terminal and start it manually.
Offline
Instead of an alias, cant you just "export" the library upon sourcing the .bashrc on login...?
e.g.
# export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so
# echo $LD_PRELOAD
/usr/lib/libv4l/v4l1compat.so
Last edited by StanIsTheMan (2009-10-01 02:48:47)
Offline
How do I go about sourcing the .bashrc on login?
Offline
How do I go about sourcing the .bashrc on login?
in your ~/ directory you should have a file called .bash_profile
Add this line:
. $HOME/.bashrc
If you don't have the file, then create it. This will source the .bashrc file upon login. Once logged in, test the source with
echo $LD_PRELOAD
It should print out the path to your *.so
Last edited by StanIsTheMan (2009-10-01 03:29:14)
Offline
So, the export works. But, now the problem is with the desktop entry file:
[Desktop Entry]
Encoding=UTF-8
Version=2.1.0.47
Type=Application
Name=Skype
Name[en_CA]=Skype
Comment=Instant Messaging and Video Voice Client
Comment[en_CA]=Instant Messaging and Video Voice Client
Exec=/usr/bin/skype
StartupNotify=false
Terminal=true
Hidden=false
X-GNOME-Autostart-enabled=true
Ignore the doubles: they were created by GNOME because of my locale. With 'Terminal' set to 'true', nothing happens upon log in (that I see). If I set 'Terminal' to 'false', then Skype starts when I log in, but with no preloaded library support, of course.
Offline
You could also create a shell script somewhere in your home directory that simply runs skype with the LD_PRELOAD as in your alias, and modify the desktop entry to run your script instead of the skype executable directly.
Offline
So, the export works. But, now the problem is with the desktop entry file:
Ignore the doubles: they were created by GNOME because of my locale. With 'Terminal' set to 'true', nothing happens upon log in (that I see). If I set 'Terminal' to 'false', then Skype starts when I log in, but with no preloaded library support, of course.
I agree with the previous poster on writing a script that exports the library and exec Skype. Then point the icon to the ~/bin folder in your home directory to launch Skype. Like this:
#!/bin/bash
#
#~/bin/skype_mod.sh
#
# Ensure that the LD_PRELOAD is clear
unset LD_PRELOAD
# Export LD_PRELOAD
export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so
# Execute Skype
exec /usr/bin/skype
exit 0
### End of File ###
Now make the file executable and make sure its saved in ~/bin
$ chmod +x skype_mod.sh
Now edit the Destop icon to point to ~/bin to load skype_mod.sh
[Desktop Entry]
Encoding=UTF-8
Version=2.1.0.47
Type=Application
Name=Skype
Name[en_CA]=Skype
Comment=Instant Messaging and Video Voice Client
Comment[en_CA]=Instant Messaging and Video Voice Client
Exec=~/bin/skype_mod.sh
StartupNotify=false
Terminal=true
Hidden=false
X-GNOME-Autostart-enabled=true
This will launch the skype_mod.sh whenever you click the icon.... If you want skype to load on startup, then point to the ~/bin/skype_mod.sh in Gnome startup Applications to launch on startup... with something like this:
(sleep 3s; ~/bin/skype_mod.sh) &
Or, you can add ~/bin to your $PATH, so in the terminal you can launch it with
$ skype_mod.sh &
Last edited by StanIsTheMan (2009-10-01 17:46:50)
Offline
Thanks, you two! It seems like a really obvious solution, now...
The script works great. I did not have any luck with your
(sleep 3s; ~/bin/skype_mod.sh) &
suggestion, but I just told GNOME Autostart to load the desktop file.
Offline
Thanks, you two! It seems like a really obvious solution, now...
The script works great. I did not have any luck with your
(sleep 3s; ~/bin/skype_mod.sh) &
suggestion, but I just told GNOME Autostart to load the desktop file.
I dont use Gnome, so I was only guessing, You can point to your ~/bin folder instead to the desktop file. like this
~/bin/skype_mod.sh
This way your always using the ~/bin, just in case the desktop file ends up missing or corrupt.
Offline