A user can easily be renamed in the desktop using the Users and Groups applet found in Menu: System –> Administration–> Users and Groups. However, renaming a user this way only changes his Full Name and does not fix up the home directory or other references. Instead, to fully rename a user, the rename must be performed from the console.
A user can not be renamed while he is logged in. Use a different admin user to perform the rename; create a temporary admin user that has rights to perform the rename if necessary (Menu: System –> Administration –> Users and Groups).
- Ensure that the desktop is logged out.
- Ctrl+Alt+F1 to get a console and log in as the admin user.
- Rename the old username to the new username (including the home directory):
usermod -l <newname> -d /home/<newname> -m <oldname>
- Move the old user’s group to the new user’s group (the group name is typically the same name as the username):
groupmod -n <newgroup> <oldgroup>
- Exit out of the console.
- Ctrl+Alt+F7 or Ctrl+Alt+F8 to return to the desktop login.
- Login and test the newly renamed user.
- To fix up the renamed user’s display name in Gnome.
- Menu: System -> Administration -> Users and Groups
- Select the renamed user.
- Beside the user’s old name click Change…
- Set the user’s new Full Name.
- Remove the temporary admin user if necessary (Menu: System –> Administration –> Users and Groups). You may need to reboot if the system reports that the user is still logged in.
Note: If your Linux image is running in VMware then CTRL-ALT-F1 won’t work directly since VMware uses CTRL-ALT to release the cursor. Instead in VMware use CTRL-ALT-Space, then let go of space, then press F1 or F8 while still holding CTRL-ALT.
Reference:
When attempting to use GCC with an include path that references a Samba share, gcc reports the following type of error:
cc1: error: /mnt/. . . samba share . . ./include: Value too large for defined data type
Apparently, GCC and some other applications can’t handle really larger inode numbers presented by the server. The workaround is to have the local system use its own temporary inode numbers on the share.
The workaround is to mount the samba share in your /etc/fstab using the nounix,noserverino mount options.
Example (all one line):
//Server/Share /mnt/sambashare cifs username=me,domain=thedomain,
nounix,noserverino,nocase,noperm,file_mode=0777,dir_mode=0777,
noauto 0 0
References:
Ubuntu allows you to change the desktop resolution once you have logged in; however, what do you do if you need to override the default screen resolution at the login screen before you’ve logged in.
So far, this is the cleanest way that I have found on how to do it. Yup, you’ve got to edit the gdm config file. Lots of older posts talk about generating and modifying the xorg.conf file; however, that is overkill in this case.
From a Ubuntu terminal or command prompt, list the available video modes and the name of the output device (in this case “default”):
$ sudo xrandr
Screen 0: minimum 320 x 200, current 1024 x 768, maximum 1180 x 885
default connected 1024×768+0+0 0mm x 0mm
800×600 60.0 56.0 0.0
640×480 60.0 0.0
320×240 0.0
400×300 0.0
512×384 0.0
1024×768 0.0*
. . .
To set a new default for the login screen:
$ sudo gedit /etc/gdm/Init/Default
Look for the lines:
PATH=/usr/bin:$PATH
OLD_IFS=$IFS
Immediately following those lines add in:
xrandr --output default --mode 1024x768
Where “default” is the name of the screen output to configure and 1024×768 is the desired gdm resolution.
Reference:
Ensure that you have the Python WMI module installed and then call WMI to uninstall your application.
import wmi
c = wmi.WMI()
print ("Searching for matching products...")
for product in c.Win32_Product(Name = "Product Name"):
print ("Uninstalling" + product.Name + "...")
result = product.Uninstall()
To list the products that Windows knows about:
import wmi
c = wmi.WMI()
for product in c.Win32_Product():
print product.Name
Software that has not been installed using Windows Installer (eg. Nullsoft Installer) will not be accessible through WMI.
References: