Posts Tagged ‘user’
Using lightdm, the wallpaper that is shown is usually the one used by the selected user. If you want to change this or just set a static wallpaper for your login screen, there are a few possibilities to do that.
The first one is to make your wallpaper inaccessible to others, letting lightdm fall back to its default wallpaper. For this method, dconf-tools must be installed. If it isn’t installed on your system yet, install it with
sudo apt-get install dconf-tools
With these tools you can easily configure lightdm – however you cannot do so in the GUI since you must be logged in as lightdm user. Do so by entering following into a terminal:
sudo xhost +SI:localuser:lightdm
sudo su lightdm -s /bin/bash
Now you can edit any of lightdm’s settings with the command line – you can use the dconf GUI as reference for the paths and variable names (the dconf path to the lightdm unity greeter configuration is com>canonical>unity greeter). Set the background picture with
gsettings set com.canonical.unity-greeter background ‘/usr/share/backgrounds/orsomewhereelse.png’
Replace the path I use with the one to the wallpaper of your choice – it must be closed in quotation marks. You can also change the background color to black (x000000) or some other neutral color.
What happens in the login screen now is that the dconf wallpaper blinks up for a second and is then replaced by your wallpaper. To counter that, you must make your wallpaper inaccessible to other users. To do that, log in to your account again and open a terminal. Change the ownership to you instead of root if you need to (wallpapers in /usr/share… usually don’t belong to you for example). Replace my username (howtoforge)and my group (howtoforge) with yours:
sudo chown howtoforge:howtoforge /usr/share/backgrounds/orsomewhereelse.png
Now right-click the wallpaper and go to the Permissions tab in the Properties menu. Set the rights of Others to None. Lightdm won’t be able to access your wallpaper any longer, so it falls back to the one you specified in dconf-tools.
The other possibility is to run
to find out your user ID and afterwards run (replace [your id] with the ID the previous command spit out (without brackets) and the path I used with the one to the wallpaper you want lightdm to display):
dbus-send –system –print-reply –dest=org.freedesktop.Accounts /org/freedesktop/Accounts/User[your id] org.freedesktop.Accounts.User.SetBackgroundFile string:/path/to/wallpaper.jpg
This command has to be repeated every time you change your wallpaper and only replaces the wallpaper for one user. You can decide whether you like this method or the previous more.
On every Windows system able to create system restore points that undo any configuration changes made after their creation, there is also the possibility to create simple quick-link icons, consisting of a few line of code, that enable you to create restore points with a double-click. On Windows XP this is achieved with only two lines of code. Learn in this post, how it is done. In Windows Vista and 7 however, there are a few problems that stand in the way of our (automatic) one-click system restore point. First one is, that the script we need to run to create system restore points can only be run with administrative powers, so we need a way to get those. Second is the annoying User Account Control that asks as if we really want to run that script. This would not be such a great deal, but if you are the kind to create restoration points quite often or after a time schedule, the UAC may become a great pain.
To start with the administrative rights, there are more than one way to get those. The probably least complex one is to add the Run as administrator option to the menu appearing upon right-clicking the script:
This is done by adding the appropriate keys to the Windows Registry. To open that, open Run… by entering run into the Windows search bar in the main menu and clicking on the program. Type in regedit into Run and the Windows Registry will open. It consists of two columns, one on the left, containing the key directories, and one on the left, showing the keys’ values. Take on the left column and browse the HKEY_CLASSES_ROOT\VBSFile\Shell directory. Right-click it and select New > Key. Name it Runas and leave its values as they are (there is only one). Now right-click the Runas key and again select New > Key. Name the newly created key Command and leave the values as they are. Right-click the Command key and select Export…. Give it a name and save it somewhere you will find it. Go to the directive you saved it and open it with notepad. Erase all of its contents and paste this:
Windows Registry Editor Version 5.00
Save the file and double-click to merge it with the registry. The Open as administrator option should now be available to all Visual Basic Scripts (you can use the one from the linked XP tutorial with this option enabled).
However, this option neither is automatic nor does it circumvent the UAC. An option that enables creating a restoration point on double-click (but still, without disabling UAC) is to alter the script that you use for this. Open a new notepad (it has to be notepad) and paste the following code:
if wscript.arguments.count = 0 then
set objshell = createobject(“shell.application”)
objshell.shellexecute “wscript.exe”, wScript.scriptfullname & ” run”, , “runas”, vbnormalfocus
getobject(“winmgmts:\\.\root\default:systemrestore”).createrestorepoint “Automatic Restore Point (Win7 Script)”, 0, 100
Save the script as *.vbs and make sure to select All files from the dropdown menu before saving! With this, you have enabled administrative rights beforehand every time you run the script. Now there still is a slightly circumstantial method to also disable the UAC prompt. To achieve this, you need to have a desktop shortcut pointing to a scheduled task that runs the script with highest privileges grantable. To access scheduled tasks, browse Menu > Control Panel > System > Administrative Tools > Scheduled Tasks. Create a new one without any trigger, executing your script (be sure to remember the task’s name, you will need it once more) and check the Run with highest privileges box on the first tab.
Now right-click your desktop and create a new shortcut. Let it point to following location (enter your own task-name in the last option):
C:\Windows\System32\schtasks.exe /run /tn “EnterYourTaskNameHere”
Upon opening, it should execute the script without asking for anything.