RSS

How-to Modify the Default User Settings in Linux

1 Comment | This entry was posted on Oct 05 2009

Just like my other two posts here is how you can modify your default user settings in Linux. This is similar to OSX but instead of “/System/Library/User\ Templates/English.lproj” being our template directory. It is “/etc/skel”.skel_directory
The skel directory stands for skeleton and it is where the default files and settings come from when you create a new user in Linux. The skel directory is a lot more basic than Windows or OSX mainly because A) not much is needed to create a Linux profile and B) all of the configuration files are stored in plan text and not some fancy .plist or .dat file.
Typically, most distros will only include three files in their “/etc/skel” directory. Those files are “.bash_logout”, “.bash_profile”, and “.bashrc”. If you want to include any more files/settings you can simply edit the configuration in your profile (or a temporary user), copy the setting files to the “/etc/skel” directory, and chown the files with root:root.new_user
What if you don’t want to overwrite the files that came with your distro but you still want to make a skeleton directory? Simple, edit the “/etc/adduser.conf” file and set the SKEL value to whatever you want. Just make sure that the folder is available to root when you are trying to create the new user. In other words, don’t put the folder on a removable drive.
If you are using the GUI to create the new user the files and settings will be copied automatically and if you are using the adduser command just make sure you use the -m flag.
That is really all there is too it. Let me know if you have more tips for creating a user profile or if this helped you out in the comments.

Linux Mint 7 review

4 Comments | This entry was posted on May 09 2009

Linux Mint 7 “Gloria” RC came out this past week and I spent some time installing it this morning. While it is based on Ubuntu 9.04, my first impressions of Linux Mint 7 are drastically different.
Here is a mini review of why I still use Linux Mint as my main OS at home.
The install was painless, as usual, and the theme was just as elegant and smooth as ever.
After the install I went ahead and updated my video card drivers and turned on advanced desktop effects. From there I needed to install some software that I use day-to-day. Instead of turning on the package manager like I normally would I opened the mintInstall tool expecting the software to refresh it’s list for the next 30 minutes. I was very surprised to have mintInstall ready to install software right when I opened it. I was even more pleased to find the featured applications option. One click on that button and it had a list of popular software that isn’t install by default. With a few check boxes I installed VLC, amarok, f-spot, picasa, etc. The only software not on the list that I needed to install was Audacity and Conduit. Ten minutes past my fresh install I had all my software installed and I was back up and running. Thanks to storing all of my information on either a network drive or a separate partition I had a fully functional Linux Mint 7 installation at this point.
One of my biggest complaints with Linux Mint in the past was the mintMenu application. While I loved its functionality of allowing you to search for programs and documents all right when the menu is open, it never had the ability to open with a hotkey, until now. I found out by accident. I pushed the “Super” key and started typing Firefox because that is what I usually do in Vista. About half way though “fire” I realized I had opened the mintMenu with the “Super” key. After reading the changlog I found that you can also change the key which is very helpful in Linux because many other programs use the “Super” key for activation (Gnome Do, Compiz shortcuts, etc.).
One other change that I didn’t expect, but am OK with, is the fact that Gnome Do does not start up by default. Because past mintMenu’s could not open with a shortcut key I began relying on Gnome Do to launch my programs and find my documents. I very much like the program but with mintMenu being able to open with just a keypress I don’t know if Gnome Do is needed any more in Linux Mint, at least not for program launching.
The only other surprising feature to find was that Evolution was not the default mail client and instead Thunderbird still held that title. While I still do like Thunderbird I feel like Evolution is a step in the right direction and I love that it can not only manage all of my personal email addresses but it can also painlessly get my works Exchange email.
In summary, Linux Mint 7 is absolutely wonderful. I have all the features and support of Ubuntu with all the polish and software I have come to love in Linux Mint. I look forward to using Linux Mint 7 more and hopefully I will be able to keep this install for at least 6 months until Linux Mint 8 comes out. Great job Clem and team, another success in my book.

Ubuntu (9.04) Jaunty Jackalope first impressions

2 Comments | This entry was posted on Apr 23 2009

I installed Ubuntu 9.04 on my main laptop (HP Compaq 8510p) and I wanted to post what my first impressions:

My first issue was with the installation. I am not sure if this feature was taken out or if there was just some other reason I couldn’t do it, but what happened to the ability to resize your Windows partition to install Ubuntu on the newly created free space? I only had two options on my install, use the entire disk (erasing Windows), or manually select which partitions to use (without the ability to resize a partition). What I ended up having to do was boot back into Windows Vista and resize my main partition to free up unallocated space on my drive manually. While this wasn’t horrible to do, I can imagine there are quite a few people out there that don’t know how to do this. After I had freed up 15 GB on my drive I had a third option to install Ubuntu on the largest available free space but it was still a bit of a hassle to do in the first place.
Once I actually booted into Ubuntu I was greeted with all of my hardware working out of the box…until I rebooted.
I am not sure why but my sound wasn’t working past the login screen. It worked just fine on the first boot and it has never failed to work in any previous Ubuntu installation on this laptop (8.04-9.04). I was eager to play some of my music, but I soon remembered one of the reasons I switched to Linux Mint…and that sent me to the package manager to install the restricted extra’s package so I could listen to my music in MP3 format. Once I finally had the package installed I then realized I couldn’t hear any music coming from the Rythumbox player. I started up Firefox and headed to YouTube to see if I had any audio there. Back to the package manager to install flash and then restarted Firefox to see if I had sound from YouTube. This confirmed that I had no sound working whatsoever. I went to the forums and installed the Gnome ALSA mixer cause I heard it solved the problem for some people but for me it would just open up with a blank window with no options but to exit. So I gave up on my sound thinking I could just use my USB sound card that has worked with every other distribution of Ubuntu I have tried it on (back to 7.10). Wrong I was. The USB sound card did not work with Audacity however after 3 more reboots all of a sudden my onboard sound worked again. I tested it with Audacity and I was set to record the next mintCast.
During all of this work to get my sound working again I probably had Firefox crash on me, I’d say, 6 times. While I am not new to having Firefox crash, especially not in Linux, I was quite surprised to have this sort of instability for a newly released OS. Sure I installed the Adobe Flash add-on but in the past when Flash crashed it just wouldn’t play videos anymore until I rebooted the browser. These crashes were full system locking, power button holding, not even RSEIUB would help kind of crashes. I will admit in the second day I used Jaunty I haven’t had Firefox crash on me once but the bitter taste of a unstable browser still frightens my every keystroke.
With everything working as it should I decided to test this famed boot speed improvements using ext4. I have seen video’s of sub 20 second boot times and I am very curious what my laptop can do. With Linux Mint 6 installed my boot times from the time I pushed the power button till the time I loaded a webpage with Firefox was about 50 seconds. I defiantly felt like Jaunty was faster than that, but after 2 tests (with auto login and and Firefox set to auto run) my best time was still only 41 seconds. Once again, a little bit of a downer.
Next thing to test was one of my outstanding problems with Ubuntu/Linux Mint. At work and at home I use a docking station to dock my laptop to be able to use a full keyboard/mouse and large monitor. When my computer is docked I get video on the external display but it never detects as a second monitor through the docking port, and instead it just mirrors my display and never lets me change my resolution on the external monitor. If I plug the monitor in to the VGA port on the laptop it is just fine however. I tried to open system preferences and all I was greeted with was this empty window that I had to force quit every time I opened it. This was finally another strike that made me very sad and disappointed that Jaunty isn’t what I thought it would be. display-preferences
The final little nagging feature was the pop-up that asks you to confirm your shutdowns and restarts just like OSX. I heard an interview with Mark Shuttleworth and he said that this was necessary for the new desktop notifications so I wasn’t too bummed about it but it does make shutting down a little more annoying.
On the plus side I do like the pop-up notifications, which I didn’t think I would, and I like the improvements made to Evolution (and it is really winning me over from Thunderbird). I think 9.04 isn’t a step backwards like 8.10 was compared to 8.04, but I don’t feel like 9.04 is living up to the hype.
I have no plans to stop using Linux Mint or Ubuntu (or Linux in general). I think they are both fantastic operating systems and I am so thankful for the countless people that put in all of their free time and talent into the system. I try to contribute in as many ways as I know how and will continue to support the community whenever I have the chance.
For now, I am looking forward to what Ubuntu 9.10 will have in store.
Let me know what things you love and hate about 9.04 in the comments.

Error with CIFS on shutdown in Linux

2 Comments | This entry was posted on Jan 19 2009

I kept getting this error with Linux Mint and my NAS. error_screenshotWhen I shutdown I got an error saying:

CIFS VFS server not responding

and the system would hang before shutting down and sometimes not shutdown at all. Of course with so many people using Linux the problem was only a Google search away.
I found that the problem is because Linux Mint would turn off the network connection before it would unmount the mounted volumes I had. It does this for security reasons because if you have system folders or home folders mapped to network shares it needs to have those system folders until it is done shutting down. Of course you would still run into problems when the network connection is killed but I don’t program so I am sure there are other reasons why it is done this way.
Anyway, a good solution is to have the drives unmounted earlier in the shutdown process. To do this we are going to make symbolic links to the script that unmount the volumes for us and then just put that in the folder that is processed earlier during shutdown and reboot. I found bits and pieces on how to do this in the Ubuntu forums but I found a good blog with all this info in one place here. here.
The code you need to run to make the symbolic links is here.
ln -s /etc/init.d/umountnfs.sh /etc/rc0.d/K15umountnfs.sh
ln -s /etc/init.d/umountnfs.sh /etc/rc6.d/K15umountnfs.sh
Here is a quick explanation of what this does from the other blog I found.

This will create two symbolic links to the umountnfs.sh script, one in runlevel 0 (shutdown) and one in runlevel 6 (reboot). The links have a “K” prefix to let the init system know that the script should be called with “stop” as an argument, and they have a priority of 15 to ensure that they are run before avahi-daemon and dhcdbd are stopped


OK that fix didn’t work. I finally found a solution that really works. Do this in a terminal instead.
cd /etc/rc6.d
ls -la

You will see two files S31umountnfs.sh and S15wpa-ifupdown.sh. The number still represents the order at which the script runs. All you need to do is change when the umountnfs.sh script runs. Do that by typing in:
sudo mv S31umountnfs.sh S14umountnfs.sh
You will need to run the command one more time in the /etc/rc0.d folder too.
Now my shutdown doesn’t hang anymore on unmounting the CIFS mounts.
I hope this helps.

Compile Lirc on an AOpen mp945-dr with Ubuntu

0 Comments | This entry was posted on Dec 26 2008

I recently traded in my Mac Mini for a AOpen mp945-dr to see if it would work any better with MythTV and Boxee. I started off with Ubuntu 8.10 installed but found some random problems with video not displaying every time the computer would start so I went back to 8.04. On problem I had with both installations was that the remote sensor did not work out of the box. I did some digging and found that Lirc does work with this machine but the latest development branch was not included in Ubuntu for stability reasons. Here are the steps I had to take to get the remote sensor working.

As a overview we are going to:
1. Download the tools needed to compile software in Ubuntu.
2. Download the latest version of Lirc using CVS
3. Compile Lirc source
4. Test it real fast to make sure it works.

If you have Jaunty Jackalope (9.04) see the notes at the bottom.

1. Download the needed compiling tools.
sudo su
apt-get install libtool autoconf automake linux-headers-`uname -r`-generic cvs

This will download and install the compiling tools.

2. Download Lirc
First lets make a folder to put it in

mkdir ~/lirc
cd ~/lirc

Then we will download the newest source from sourceforge. We are using a tool called CVS to read more about it check out here.
cvs -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc login
cvs -z8 -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc co lirc

Because we ran that command while in the ~/lirc folder everything downloaded there so we just need to run the commands to configure everything before we build it.

./autogen.sh
./setup.sh

In the graphical interface I selected Driver config > USB > mceusb2 (new)

Then continue with compiling

make
make install
modprobe lirc-mceusb2

Because Ubuntu does things slightly different we need to copy a couple files to where Lirc expects them to be.

cp /lib/modules/`uname -r`-generic/misc/lirc_dev.ko /lib/modules/`uname -r`-generic/ubuntu/media/lirc/lirc_dev
cp /lib/modules/`uname -r`-generic/misc/lirc_mceusb2.ko /lib/modules/`uname -r`-generic/ubuntu/media/lirc/lirc_mceusb2

Then we can continue with installing the new Lirc into the running kernel.
rmmod lirc_mceusb2
rmmod lirc_dev
lsmod|grep lirc
/etc/init.d/lirc restart

Everything should be compiled and in place now.

4. To test it out run
irw
and then push some buttons on the remote. You should see the commands you press displayed in the terminal. If you see that then you can just push Ctrl+C to stop irw and you should be all set to go.

I had to change this tutorial slightly from where I originally posted it in the Ubuntu forums so that it would be more universal. If you have problems please leave a comment and check out the original thread here.

I hope this helps.

For Jaunty (9.04) I did not need to install the headers (it actually failed because it was already the newest version) I also needed to install “dialog” and “build-essential”. I had to create the “/lib/modules/`uname -r`/ubuntu/media/lirc/” folder before I could copy the configurations, and the folder I created also changed slightly to cp /lib/modules/`uname -r`-generic/misc/lirc_dev.ko /lib/modules/`uname -r`-generic/ubuntu/media/lirc/lirc_dev
cp /lib/modules/`uname -r`/misc/lirc_mceusb2.ko /lib/modules/`uname -r`/ubuntu/media/lirc/lirc_mceusb2

More updates as I find them.

Open files as root (the easy way)

1 Comment | This entry was posted on Dec 06 2008

I ran across a couple of tips in Linux to open a file as root without having to use a terminal. The first is a shortcut on your desktop. To make this one just right click on your desktop and then select “Create Launcher…”. When the dialog box pops up you can put in whatever you want for “Name” and “Comment” but for “Command” just put in the following command.

gksudo “gnome-open %u”

Now to open a file as root all you have to do is open the file location and drag the file to that shortcut. The system will probably ask you for your root password and then open the file as root.

A easier way is to browse to ~/.gnome2/nautilus-scripts/ and create a new file called “Open as root”. Edit the file and put

#!/bin/sh
gksudo “gnome-open $NAUTILUS_SCRIPT_SELECTED_URIS”

inside the file. Right click on the file and go to properties -> permissons then check the box that says “Allow executing file as a program”. Now all you have to do is right click on a file you want to open as root, go to scripts and click “Open as root”.

I just wanted to pass these along cause I thought they were very helpful.

How-to tether Windows Mobile to Ubuntu

7 Comments | This entry was posted on Oct 16 2008

Another random site I found the other day had this little tip on tethering your Windows Mobile phone to Ubuntu.
Seems pretty straight forward. I haven’t tried it yet but I don’t think it would be too complicated.

apt-get install subversion
svn co https://synce.svn.sourceforge.net/svnroot/synce/trunk/usb-rndis-lite
cd usb-rndis-lite/
make
sudo ./clean.sh
sudo make install

Then you just need to go to internet sharing on your phone and plug it in. Whenever I have a chance to give it a try I will let you know if it works for me.
If you get a chance to try it leave me a comment and let me know.

Ubuntu CPU scaling

0 Comments | This entry was posted on Oct 16 2008

I ran across a good article on how to scale your processor in Ubuntu. For me this was turned on by default and it really helped my battery life on my laptop and now it is nice to know how to configure it.
Here is the link to the full page. I am going to echo the text here just in case the website becomes non-existent like so many good sites do.

CPU Scaling is a feature built into most modern (mobile) CPUs that allows them to scale up or down in how fast they run and how much energy they suck down based on demand. If you have a fairly modern mobile computer there’s a very good chance that your CPU(s) can handle frequency scaling.

Why should you care? Well, you can control this to tell you computer how much power and how fast it should allow it’s CPU(s) to operate. This can save some energy and thus battery life at the expense of a little performance – which is great for extending the use time of your laptop when it’s unplugged.

Can your CPU(s) handle scaling? There’s an easy way to find out. Open up a terminal session (Applications -> Accessories ->Terminal) and type or paste the following into it:

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies

On my machine I get back

1667000 1333000 1000000

Those are in Hertz, so my machine is capable of 1.66Ghz, 1.33Ghz and 1.00 Ghz.

Now that you know your CPU(s) can handle scaling, let’s see what modes are available. In the terminal, type or paste:

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors

Again, I get:

powersave ondemand userspace conservative performance

Powersave will keep the CPU constantly at the lowest frequency. Ondemand will set the CPU at the lowest frequency (in my case, 1.00Ghz) until use of the CPU increases, then it will automatically bump it up to the highest frequency (with me, 1.66Ghz). Userspace means that a different program will be used to control the CPU’s scaling. Conservative is where your CPU will go up as needed, starting at the lowest frequency, and then bumping up to the next available until it maxes out. Performance simply sets the CPU(s) at the highest available frequency and keeps it there.

The lower your frequency, the less power you use. So, if you’re bent on extending your battery life to the max, you’d want to keep your CPU(s) at their lowest frequency – but you’ll do this at the expense of computing power. In my case my 1.66Ghz processors would effectively be 1.00Ghz processors.

Now, how do you actively control this? It’s fairly easy. Right click on an empty space in your taskbar (where your applets and such things as Applications, Places and System are located) and choose “Add to panel”. From there, find the CPU Frequency Scaling Monitor. Double click on this and it will appear in your taskbar. Right click on it and choose Properties and you can set various options like have it show your CPU frequency as a frequency (i.e. 1.33Ghz) or as a percentage. If you have multiple CPU’s or a dual/quad core machine you can also choose which CPU to monitor.

To configure this applet to actually allow you to control how your CPU(s) scale, you’ll have to had back to the terminal.

Type this:

sudo dpkg-reconfigure gnome-applets

This will throw up a nifty blue screen asking you to say Yes. Do so. Then it will ask if you want to install cpufreq-selector with SUID root. Say yes. Once you’ve done this, go back to your CPU Frequency Scaling Monitor in your taskbar and left click it. You should now be presented with a bunch of options from which you can choose the one you want. You can also directly set the frequency at which your CPU(s) will run at, which can be handy if you want to scale up or down for a short bit and then manually change it again.

As you can see, I’ve got mine set to Ondemand, allowing the frequency to scale up through three different settings (1 GHz, 1.33 GHz or 1.66 GHz) as needed.

While this will take effect immediately, it will only be in effect until you reboot at which time your default settings will come back. To change the default head back into your terminal and type:

gconf-editor

From there head to apps -> gnome-power-manager -> cpufreq. Find the settings policy_ac and policy_battery and change them to whichever setting you want for the default.

For those with multiple cores or processors who happen to be a bit needy in the info department (like myself) you can add an applet for each CPU. Just add as many applets as you have CPUs and then right click on them, choose Preferences and use the drop down to choose which CPU that particular applet is monitoring.

Now you know a lot more about CPU Frequency Scaling then you may have when you started reading this article and you know how to set it on your computer.

All credit goes to arsgeek at Hubpages.
While I didn’t use the applets the whole article is very well written and has lots of information.

Make Ubuntu better with brainstorming

0 Comments | This entry was posted on Mar 04 2008

It has been a while since my last update but I have been really busy with lots of stuff. Here is a quick update I have for now.

I will start with saying that the Ubuntu developers saw it fit to ask its users for good ideas to put into the operating system. The best way to do this of course is to put it online and let people come and suggest whatever they want. Well brainstorm.ubuntu.com was launched last week and let me tell you there are a lot of great ideas on there. I actually think I learned more by looking at the ideas that were posted and going through the comments to see what people said you can do right now to fix it than if I had just gone to the Ubuntu forums and searched for hours and hours.

That being said here are a couple of things I found that make Ubuntu a little better in my opinion.

First is the fix for when Ubuntu has to scan your hard drive at boot time (every 30th time a volume is mounted). This is very annoying to say the least. Especially if you have more than one hard drive in your computer. My computer is scanning itself once every eight times I turn on my machine. That not only slows down productivity but it also just makes me not want to use my desktop. Some people say you can easily turn off the scan but I am a bit too paranoid for that. So I found a couple quick fixes to make scanning more manageable. The first one, the one I am currently using, is called AutoFsck. All AutoFsck does is it warns you when you go to shut down your computer that Ubuntu will want to scan at next boot. It then prompts you if you want to restart now, have the scan run, and then have the computer shut itself off.  Or you can choose just to let the scan run as it normally would. While restarting and scanning seems to waste even more time than scanning at startup, it still makes it easier because if I am shutting down my computer, chances are I am done using it and it can stay on scanning as long as it needs to. The second tool is called Bonager. This one works a little different by letting you know how many mounts you have left before a scan will be forced and if you want to you can schedule the scan for the next boot.

The second thing I found is called Gnome Control Center. It is actually really old and as far as I know is installed by default but isn’t configured to show up in the menu. To enable it you can go to the Ubuntu preferences and find the main menu option. When it comes up select System on the left and then check the Control Center box. You can remove Administration and Preferences to make the menu smaller and more usable. The Gnome CC lets you manage everything that was in the other two lists in a single window. In my opinion this is far better and makes things easier to find. The find feature helps for that too.

That is all I got for right now. I have a few things I am working on but nothing to post here. I am looking forward to the April release of Ubuntu 8.04 and am excited to see what the Mythbuntu team does for that release.

Until I have some more news let me know if you find any other helpful tips from brainstorm.ubuntu.com

A2DP in Ubuntu

0 Comments | This entry was posted on Feb 10 2008

I got some Motorola headphones a couple of years ago for my birthday and I love them. Only problem I have had was that I never figured out how to get the headphones to work under Ubuntu.  I am currently using Ubuntu 7.10 and although Ubuntu detected my bluetooth adapter just fine I have had problems getting it to detect my headphones.

Thanks to Jacob over at FOSSwire I now have my headphones working and a easy way to switch between them and my internal speakers. I don’t want to copy and paste the full article out of respect for internet traffic/site uniqueness so just hit the link, download the script, and enjoy some wireless music in Ubuntu. I also attatched the script just in case it gets taken off of FOSSwire.
Link a2dp install script