Showing posts with label gnome3. Show all posts
Showing posts with label gnome3. Show all posts

Wednesday, 25 September 2013

launching applications upon login to Gnome3

I wanted to run a simple program after logging into a graphical session (Gnome3).

There is a simple graphical utility startup applications (gnome-session-properties), this can be run directly but does not by default show up in search.
To have it show up in all applications or search edit the file /usr/share/applications/gnome-session-properties.desktop and change the line NoDisplay to false e.g.

NoDisplay=false

Adding a new startup application will create a new desktop file in ~/.config/autostart. Therefore to create a new startup application a new file could be created in this directory, for format of the file just copy an existing file and modify as necessary.
A simple entry is below

[Desktop Entry]
Type=Application
Exec=<command>
Hidden=false
X-GNOME-Autostart-enabled=true
Name[en_US]=<name>
Name=<name>
Comment[en_US]=<comment>
Comment=<comment>

Sunday, 23 June 2013

Gnome3 login screen background

Using the default background for the login screen has never really bothered me, however I thought it would be useful to know how to customise it.

Changing the desktop background is easy in the graphical environment using gnome-control-center.

However the background for the login screen is set for the user that runs the login screen, which is gdm. Therefore changes need to be made for the gdm user. I have found mentions of modifying xml files directly but it looks like the easiest way is to launch the gnome-control-center as the gdm user.
The steps are

su -
xhost +si:localuser:gdm #to allow gdm user access to X server session
sudo -u gdm dbus-launch gnome-control-center

The desktop background picture can now be changed to either one of the defaults or a new custom picture if desired. Once picture has been selected and gnome-control-center has been closed the change will take effect.

The only thing left is to remove access for gdm user to X server session
xhost -si:localuser:gdm

To change the desktop background from the commandline you can use the gsettings command and point it at you picture file as follows
gsettings set org.gnome.desktop.background picture-uri "file://<filename>"