Wednesday, July 11, 2012

Rename files with spaces and other unwanted chars (like from MAC)

Some times, I get files from MAC users and... they use all that what the system bring them:
spaces, accents (é ç à è ê ...), and others (&, ° ...)

It is a not easy and time consuming to remove them by hand.
So I made a script. But dealing with spaces was a BIG deal. So I post it.

NOTE: I put my scripts in the $HOME/bin directory so they can be called from everywhere.
  • macos2linux_files.sh scans the current directory for file names to convert and do the job.
  • names_to_char7_echo_mv.sh is creating a mv command when the file name need to be renamed and and do the real hard job :"dealing with spaces"
  • names_to_char7.sh is called to convert the name

Read more »

Sunday, July 08, 2012

GNOME autologin

Automatically login into a GNOME desktop is dangerous for security reasons, but it is possible.
In /etc/gdm/custom.conf add the following lines:
---

[daemon]
AutomaticLoginEnable=true
AutomaticLogin=
---

AutomaticLogin is given the name of the account you want to login to.
You must also unlock GNOME Keyring, a service used by GNOME programs to securely store various secrets, such as passwords.
Since you did not login, no password was given to it and GNOME is asking a password for Keyring preventing the computer desktop from being used.
You must remove the password from Keyring to prevent GNOME from asking the password.