Find the answer to your Linux question:
Results 1 to 6 of 6
Hello, I enjoy the configurability of Linux but sometimes settings are a mystery. I would like to set a series of X applications to start upon login for the user ...
  1. #1
    Just Joined!
    Join Date
    Dec 2011
    Posts
    16

    Starting a batch of X utilities upon login.

    Hello,

    I enjoy the configurability of Linux but sometimes settings are a mystery.

    I would like to set a series of X applications to start upon login for the user "ryan". I'm currently using Debian which has a graphical login screen that starts after X11 loads up. My concern is that the X programs will not load after X starts because the user has not logged in yet.

    How can I ensure that the following utilities start for user "ryan" when he logs in?

    xclock
    gmix
    gnome-terminal
    xclipboard
    google-chrome
    xsetroot -bg black -fg green -bitmap /home/ryan/Pictures/back.xbm

    Also it would be nice if they did not all pile up in the corner of the screen when they start but right now I'd be happy just having them all ready to roll when the user logs in.

    Thanks in advance!

  2. #2
    Just Joined!
    Join Date
    Dec 2011
    Location
    75081
    Posts
    14
    This may differ based on the window manager.

    Some possibilities off the top of my head. May not be actually correct but may point you in the right direction
    ~/.config/autostart/*.desktop (lxde, xfce, etc)
    ~/.config/openbox/autostart
    ~/.fluxbox/autostart.sh
    etc

  3. #3
    Trusted Penguin elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    2,295
    What window manager or desktop are you using?
    If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)


    My new blog. It's probably not as good as I think it is.

  4. #4
    Linux Guru
    Join Date
    May 2011
    Posts
    1,813
    In theory, you can use .xinitrc (for runlevel 3 / startx) and .xsession (for runlevel 5 / graphical login) to put custom X commands, including launching your desktop manager. I just link the one to the other (ln -s .xinitrc .xsession or vice versa).

    Mine might look like:

    Code:
    #!/bin/bash
    xclock&
    gmix&
    gnome-terminal&
    xclipboard&
    google-chrome&
    xsetroot -bg black -fg green -bitmap /home/ryan/Pictures/back.xbm
    exec gnome-session
    make sure it is executable. some newer versions of X or GDM can ignore these files, though I think. YMMV.

    in that last line, i'm assuming GNOME of course...

  5. #5
    Just Joined!
    Join Date
    Dec 2011
    Posts
    16
    I see, on this system I have multiple window managers. I use twm for low resource computing and Gnome when I need a more visual desktop. I tried creating an .xinitrc file but did not include the shell specification nor did I ensure it was executable. I'll have to try that tonight. Thanks.

  6. #6
    Just Joined!
    Join Date
    Dec 2011
    Posts
    16
    Ok it looks to be working correctly!

    Thanks everyone.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •