Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am looking for a way to run some startup scripts when a user logs into KDE. Normally, I would put the scripts in ~/.kde/Autostart, but this script needs to be run *before* KDE goes through its initialization process. I would also like the scripts to run as the user that starts the KDE session.
I tried placing the script in ~/.xsession and ~/.xprofile, but that didn't seem to work. Anybody have any idea if such a startup config for KDE even exists?
Try editing /usr/bin/startkde by putting your startup script at the beginning. Startkde is a script that, not surprisingly, starts kde; it runs with the privilege of the user starting kde. Should work in theory.
Oh this is easy! You put your stuff that you want to load up into ~/.xinitrc. I'm starting the KDE from here because I uninstalled xdm/gdm/kdm.
Code:
$: cat ~/.xinitrc
/home/psycho/Programming/Library/bin/bootup & # This is the stuff I start before KDE starts
exec startkde
#Don't mind the stuff below here, though it may give you some good ideas :]
#exec gnome-session
#exec aewm -3 xterm
# Run profile to set $PATH and other environmental vars correctly
#. $HOME/.bash_profile
# Set background
#xsetroot -solid '#056'
# Set mouse acceleration
#xset m 7 2
# Run initial programs
#xterm &
# Start icewm
#exec icewm-session || exec xterm -fg red
I thought I had finally found the answer. I want bittorrent to start when I logon. Most of the time, it's only seeding and I can forget to start it.
This is the .xinitrc in my home folder:
Quote:
#!/bin/bash
#
/usr/bin/bittorrent
I did not have the path initially because it is not needed in the menu shortcut. With or without the path, it is ineffective.
I also tried adding a symlink to /~/.kde/Autostart but it does not autostart. I'd prefer to make provision at the user level and just leaving the bittorrent window open when shutting down seems crude and dirty.
.xinitrc is not mentioned in the .xsession-errors file but the symlink is:
Quote:
File "/home/terry/.kde/Autostart/bittorrent", line 3809, in ?
d = DownloadInfoFrame(config,TorrentQueue.ThreadWrappedQueue(torrentqueue))
File "/home/terry/.kde/Autostart/bittorrent", line 2727, in __init__
self.mainwindow = Window(gtk.WINDOW_TOPLEVEL)
File "/usr/lib/python2.4/site-packages/BitTorrent/GUI.py", line 287, in __init__
IconMixin.__init__(self)
File "/usr/lib/python2.4/site-packages/BitTorrent/GUI.py", line 280, in __init__
icon16 = gtk.gdk.pixbuf_new_from_file_at_size(iconname, 16, 16)
gobject.GError: Failed to open file '/home/terry/.kde/Autostart/images/bittorrent.ico': No such file or directory
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib/python2.4/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/home/terry/.kde/Autostart/bittorrent", line 3799, in btgui_exit_gtk
mainloop.run()
File "/home/terry/.kde/Autostart/bittorrent", line 3767, in run
self.mainwindow.traythread.start()
AttributeError: 'NoneType' object has no attribute 'traythread'
which is so much gobbledegook to me. Why kde expects to find the icon file in autostart is a mystery.
Perhaps this is a question about bittorrent?
Gnome, evidently, has a gui command for adding startup files. There is a dearth of information about this. I've tried Mandriva and kde sources. I'll keep on looking but linuxquestions in my experience is the best place to get answers.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.