Posts Tagged Gnome

How to disable the screensaver in Ubuntu Classic Gnome

Note that screensaver preferences are a per-user setting, meaning each user has their own settings. If you’re experiencing issues with the screensaver (lack of OpenGL acceleration, system hanging, etc) you’ll want to disable them for each user account.

Open System > Preferences > Screensaver (see the screenshot below)

Click for larger view

Uncheck “Activate screensaver when computer is idle” then click Close.

Click for larger view

Changes take effect immediately.


Leave a comment

Broadcasting a multimedia stream using icecast2 and gst-launch in Ubuntu Linux

The following is (I hope) an adequately-documented procedure to stream desktop audio capture via icecast2.

What you will need:

  • Basic audio hardware
  • An Internet connection
  • Ability to accept inbound connections on a port (default 8000)
  • Some basic idea of what you’re doing :)


Setting up the icecast2 server

Icecast2 is a free server for streaming multimedia similar to SHOUTcast. I won’t go in to all of the differences here — you can easily Google them or visit the respective websites and do some light reading. What I will actually explain here is how to get the server actually running.

Install icecast2 from either Synaptic or command line.

sudo apt-get install icecast2

By default, the icecast2 server’s logging configuration is set up in a way that might deeply frustrate the amateur user. This is because it is set up to log to /var/log/icecast2, which is set up with the following permissions:

drwxr-xr-x 2 icecast2          icecast    4096 2011-06-27 23:45 icecast2

That’s 0755 for user icecast2 and group icecast. Fortunately that user and group account are already created for us, but the configuration file isn’t set to change the running process id (it’s commented out) and the entered defaults are for user nobody. No worries. Read on.

Now edit the  /etc/icecast2/icecast.xml config file using your favorite text editor. If you don’t mind my recommendation, and you’re doing this on a machine running Gnome or Unity, gedit is excellent. Make sure to edit the file as root.

sudo gedit /etc/icecast2/icecast.xml

Edit the file to your preference.

The next settings change depends on whether you’re running Ubuntu Desktop or Server. Find the section below that applies to you.

Ubuntu Desktop: Make sure to head down to the bottom and make the important change to set the correct user/group combination. Find the  section and uncomment (remove the <!-- and --> marks) from around the section. Change to icecast2 and to icecast, like so:


Now start the icecast2 server

sudo icecast2 -c /etc/icecast2/icecast.xml

You should see messages similar to the following:

Changed groupid to 125.
Changed userid to 115.

… and then the program will not produce any more output, but remains running (does not drop back to a prompt). Congratulations, your icecast2 server is running. If it produced an error message, or dropped back to a prompt, investigate the configuration file for any problems, and make sure the port you have icecast2 set to isn’t being used by another process.

To stop the server, hold ctrl and press c (CTRL-c). It does take a few seconds after the keypress to completely halt.

Ubuntu Server: Edit the /etc/default/icecast2 file. The uid and gid should already be set correctly. Verify they are set as follows:

# Name or ID of the user and group the daemon should run under

Next, follow the instructions on the last 3 lines:

# Edit /etc/icecast2/icecast.xml and change at least the passwords.
# Change this to true when done to enable the init.d script

Now start the service

/etc/init.d/icecast2 start

You should get the following output:

Starting icecast2
Detaching from the console

Finding your audio device for streaming

I tried using various programs to set up my audio stream, such as the SHOUTcast Transcoder (sc_trans), darkice, and a few others that I don’t even recall — but none worked correctly for my case. The reason? I either couldn’t figure out what audio device to use, or it wouldn’t work with the audio device I gave it.

As it turns out, Linux machines primarily use PulseAudio as a sound system and many of these utilities expect or are designed to work with an ALSA sound system. I tried /dev/dsp and /dev/audio as input devices but neither existed on my system. I tried padsp with darkice configured to use /dev/dsp but that didn’t work either. I found Alexandru Csete’s GStreamer article and a few other posts and figured gst-launch-0.10 would be the answer that I needed. As it turns out, that was completely correct.

With all credit to Alexandru Csete, here are the steps to find the correct PulseAudio device name for your scenario.

Run the following command:

pactl list | grep -A2 'Source #' | grep 'Name: ' | cut -d" " -f2

You should get output similiar to the following:


These output ‘monitor’ sources feed your devices entire playback stream — effectively ‘what you hear’. The input sources are a microphone or other line-in device. Select the device appropriate for your scenario. If you are trying to capture a webcam microphone or other removable device, generate this list with your device plugged and then unplugged and then compare the lists to find your device.

Once you have your device name, it’s time to…


Set up your audio stream

Example command:

gst-launch-0.10 pulsesrc device=DEVICE ! audioconvert ! vorbisenc bitrate=BITRATE ! oggmux ! shout2send ip=IP port=PORT password=PASSWORD mount=MOUNT

An explanation of the options:

  • DEVICE: Your audio device (from above)
  • IP and PORT: The IP address and PORT number of your Icecast2 server
  • PASSWORD: The password to your icecast2 server
  • MOUNT: The mount point of your stream.
  • BITRATE: The bitrate you want your audio to be (see examples below)

In my case the audio device I wanted to use was:


So my line was:

gst-launch-0.10 pulsesrc device=alsa_output.pci-0000_00_1b.0.analog-stereo.monitor ! audioconvert ! vorbisenc bitrate=32000 ! oggmux ! shout2send ip=localhost port=8000 password=XXXXXX mount=stream

The above produces an OGG stream. This works pretty well, but some Windows users report issues with OGG streaming. If you want MP3 streaming instead, try this:

gst-launch-0.10 pulsesrc device=alsa_output.pci-0000_00_1b.0.analog-stereo.monitor ! audioconvert ! lame bitrate=32 ! shout2send ip=localhost port=8000 password=XXXXXX mount=stream

Note that if you are streaming to a SHOUTcast server (as opposed to an Icecast2 server), change the command as follows:

Remove mount= and replace it with protocol=2. Make sure you are connecting on the port specified in sc_serv.conf and not the +1 port. Example:

gst-launch-0.10 pulsesrc device=alsa_output.pci-0000_00_1b.0.analog-stereo.monitor ! audioconvert ! lame bitrate=32 ! shout2send ip=localhost port=8000 password=XXXXXX protocol=2

Running this produces output similar to the following:

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstAudioSrcClock

If you get some sort of error investigate your shout2cast settings.

Again, CTRL-c stops the streaming.

At this point, you should have a working icecast2 server and a working stream (via gst-launch-0.10). Congratulations!

I’m sure this guide is far from perfect, so please feel free to share any feedback you may have in the comment sections below. Thank you!

, , , , , ,

Leave a comment

Guild Wars on PlayOnLinux

Here’s a quick run-down of the steps that I took when setting up Guild Wars on a friends Ubuntu machine under PlayOnLinux.

We chose PlayOnLinux because of the ability to use Wine prefixes, so we could customize the Guild Wars prefix for best play experience and no interfere with other configured Wine software. It also gave the easiest installation experience. We also chose PlayOnLinux as a free alternative to commercial programs like CrossOver Games.

Your experience may vary but this is what worked for us.

First, install PlayOnLinux either from Synaptic or the command line.

sudo apt-get install playonlinux

PlayOnLinux will be found under Applications > Games > PlayOnLinux (Gnome) or can be searched for in Unity.

Next, install Guild Wars

After starting PlayOnLinux, click the Install button, then click Games in the left column, and locate Guild Wars on the right side.  Click Apply. Follow the on-screen dialogs to complete the installation of Guild Wars.

Once Guild Wars is installed, it’s time to tune it for performance. Note that much of the following is subjective, and may not be needed under certain circumstances.

— Tune the Guild Wars wine configuration

Once Guild Wars is installed, locate it’s entry in PlayOnLinux and click it, then click Configure this application. The application configurator will open. Click Forward and choose Configure Wine, then Forward again to launch the Wine configuration utility.

Once the Wine configuration utility is open, click the audio tab. If you get a dialog message stating that the audio driver was auto-detected. That’s fine. Set the DirectSound Hardware Acceleration mode to Emulation. Next choose the Graphics tab and under Direct3D, uncheck Allow Pixel Shader.

— Force Guild Wars to start in windowed mode.

Guild Wars will inititally start in full-screen mode. If this causes the client to crash or causes strange graphics issues, you may force it to start in windowed mode using the following terminal command:

WINEPREFIX=~/.PlayOnLinux/wineprefix/GuildWars/ WINEDEBUG=-all wine "C:GWGw.exe" -windowed

This will start Guild Wars in a window.

— Further registry tweaks

Locate the Guild Wars entry in PlayOnLinux and click it, then click Configure this application. The application configurator will open. Click Forward and choose Registry Editor, then Forward again to launch the Wine configuration utility.

Navigate the registry to


(If the Direct3D key does not exist, right-click on Wine and choose New > Key and name it Direct3D)

Right-click and choose New > String value. Call it UseGLSL. Double-click on UseGLSL and set Value data to “disabled” without quotes.

See also:

, , , ,

Leave a comment

Gnome places menu items give ‘File not found’ error

This is one of several issues that I ended up helping a friend with last night on his Ubuntu installation. When clicking an item in the ‘Places’ menu, such as Pictures, Home, Music, etc, a dialog box appears that reads “Error: File not found”. We were scratching our heads until I realized that the error dialog looked suspiciously like it was being displayed using Wine.

After a bit of searching my suspicions were confirmed. This happens when, through one action or another, Wine is assigned the ‘Open Folder’ association. When you try to open a folder using the menu, Wine tries to open it and subsequently fails, and that’s where the error comes from.

Unfortunately I don’t have a screenshot but I do have a solution courtesy of Ubuntu Forums.

Open and edit the ~/.local/share/applications/mimeapps.list file. You can use this command:

gedit ~/.local/share/applications/mimeapps.list

Locate the line that starts with inode/directory= and change it to read as follows:


Save. Changes take effect immediately.

, ,

Leave a comment

How to easily create a multipart (multivolume) RAR file easily in Ubuntu

This explains how to quickly and easily create a multipart (multivolume) RAR file using Gnome / File Roller in Ubuntu.

First, locate the file(s) / folder(s) you want to compress and highlight them. Next, right-click and select Compress...

When the Compress dialog appears, enter a filename for your archive and select rar as the extension. Click the arrow next to Other Options to expand the dialog. Check the box next to Split into volumes of and enter the desired max individual file size here.

Click Create and the compression process will begin. Note that on extremely large multipart archives with lots of part files, a heavy amount of disc activity may occur, and the archiving process (and some other programs) may stall or momentarily freeze because of the disc activity. Be patient and allow the process to complete.


1 Comment

How to check your hard drives SMART status using a Ubuntu Live CD

Checking your hard drive’s SMART status is a good idea if you’re running into issues that make you think the hard drive may be bad. In this scenario, I’ll be showing you how to use a Ubuntu Live CD to check the hard drive’s SMART status. This is good for situations where you either boot to the installed OS, cannot reliably install an OS, or cannot install a program on the installed OS to check it yourself.

This walkthough uses the Ubuntu 10.10 Desktop 32-bit CD to prevent issues that may arise from Unity. Download links:

Assuming you follow only the instructions in this guide, the data on your hard drive won’t be affected by this check. However, if your drive is catastrophically failing, i.e. head crash, any disk activity may lead to further data loss.

First, boot off the CD.

Select your language with the arrow keys, press enter.

Select Try Ubuntu without installing

After a moment or two you will be at the GNOME desktop (Menu bar at the top and taskbar at the bottom). Don’t worry if it’s slow, it’s to be expected — you’re working off a Live CD.

From the System menu, select Administration then Disk Utility.

The Disk Utility window appears. On the left pane, locate and click your system’s hard drive.

On the right page, locate the field that says “SMART Status” — your drives status will appear.

If it says “Not Supported”, your drive (or host controller) doesn’t support the SMART protocol and can’t give you any information. However, it may take a few moments to refresh. You can always run the SMART tests to force it to check the drive again.

Once you’re finished checking the SMART status, shut down by clicking the power icon in the very top-right corner of your screen, or simply hold the power button on your PC for 4 seconds. Eject the disk and your PC will boot to the hard drive.

Questions or comments about using the Ubuntu Disk Utility to check SMART status are welcome in the comments.

, ,

Leave a comment

CrashPlan backup to Samba share on Linux

For about a week now I’ve been wrestling with implementing a system where CrashPlan would backup to my network drive. I ran into a really bit problem: When you mount a network location in Gnome using the GUI (gvfs), root can’t access it. Since the CrashPlan engine runs at root, it makes the network location unusable as a backup destination.

After a while of working on different ways to solve this rather large hurdle, I came up with the idea of simply mounting the network location using smbmount (mount.cifs). After some testing and tweaking, I was able to get it successfully working and added an entry to fstab to have it mount at boot time. I chose /mnt/mynas as the mount point.

See Synology DiskStation and Samba mount permissions for my method of getting it mounted with the correct file permissions.

Once it was set to mount at boot-time, I can now open the CrashPlan client and set /mnt/mynas as a destination folder, and now I have both local and off-site backups!

Feel free to share your thoughts and/or feedback in the comments below!

, , , , ,

1 Comment

Synology DiskStation and Samba mount permissions

So today I was using smbmount to mount a network share from my Synology DiskStation to my Linux PC when I noticed a rather annoying file permissions issue that I couldn’t seem to fix. Why am I using smbmount and not Gnome’s GUI to mount? Because I need root to have access to the file system as well so that CrashPlan can back up to it.

Here’s what happened:

First, I mounted the share (as root):

smbmount //diskstation/mike /mnt/mynas -o credentials=/home/mike/mike.cred,uid=mike,gid=mike

(For more information on the smbmount or the mount.cifs credentials file, see the Ubuntu manpage for mount.cifs)

That worked great, except for when I do this (as root)…

ls -ld /mnt/mynas

… I get the following output:

drwxrwxrwx 17 mike mike 0 2011-05-20 09:25 mynas

I sure didn’t want the directory world-writable. So I tried specifying file_mode and dir_mode as both 0755 using the following (as root):

smbmount //diskstation/mike /mnt/mynas -o credentials=/home/mike/mike.cred,uid=mike,gid=mike,file_mode=0755,dir_mode=0755

Then I checked it:

ls -ld /mnt/mynas

… and got:

drwxrwxrwx 17 mike mike 0 2011-05-20 09:25 mynas

That didn’t do anything at all to help. Why? Because as it turns out the DiskStation is using a Samba server with CIFS extensions and is passing the permissions to smbmount (mount.cifs). The file_mode and dir_mode options are ignored if the remote server is using CIFS extensions.


If the server does not support the CIFS Unix extensions this overrides the default file mode.


If the server does not support the CIFS Unix extensions this overrides the default mode for directories.

Source: Ubuntu manpages.

So there’s a couple of options here. First, I could set it to mount somewhere inside /home/mike, which would generally protect it. But I’d really like to know what’s up with the file permissions. So I did a little more Google-fu.

As it turns out, the CIFS extensions on the DiskStation can be disabled, all it takes is to edit a file. Lepoulpe posted on the Synology forums the following edit:

you can disable “unix extensions” in the ds106’s samba server. To achieve this, you need to add the folowing line in the [global] section of /usr/syno/etc/smb.conf :

unix extensions=no

So, I SSH’d into my DiskStation as root (should be the same password as ‘admin’ if you’re having trouble) and used the vi editor to make the edit. Afterwards, I restarted samba on the DiskStation by doing this:

/usr/syno/etc/rc.d/ restart

Then I remounted the Samba share as root…

smbmount //diskstation/mike /mnt/mynas -o credentials=/home/mike/mike.cred,uid=mike,gid=mike,file_mode=0750,dir_mode=0750

… and checked the permissions:

ls -ld /mnt/mynas

… and got the following output:

drwxr-x--- 17 mike mike 0 2011-05-20 09:25 mynas

Exactly right.

So now I have /mnt/mynas mounted to my share on the DiskStation. If I wanted it to mount on boot, I could add something like the following to /etc/fstab:

//diskstation/mike /mnt/mynas smbfs auto,credentials=/home/mike/mike.cred,uid=mike,gid=mike,dir_mode=0750,file_mode=0750,user 0 0

Questions about my method? Have any feedback or alternate methods to share? Please feel free to do so in the comments below. Thank you!

, , , , , , ,


The configuration defaults for GNOME Power Manager have not been installed

A friend brought me a Ubuntu system with the following issue:

On entering gdm, the login prompt was displayed on a black background and the following message appeared in the top-right corner:

“The configuration defaults for GNOME Power Manager have not been installed correctly. Please contact your computer administrator.”

Trying to log in as any user account was unsuccessful.

I don’t remember where I found the fix, but here’s what I did to fix it:

Once the gdm login screen appears, press CTRL-ALT-F1, which will switch you to a text-based login prompt, and log in using an account that has sudo privleges.

Run the following command:

sudo dpkg --configure -a

It may take a minute or two to complete. After that:

sudo reboot

After the reboot, when gdm appears you should have your colored background and the message should not appear.

Questions, comments, and feedback on this are welcome.



Disabling the GNOME Nautilus navigation history

Previously I wrote about how to disable your GNOME Recent Documents menu. This post covers a second GNOME history menu: That which is contained at the bottom of your ‘Go’ menu.

The part you see in the image, below the “Clear History” is the navigation history. It contains a list of recently accessed folders, removable devices, and network shares. The one thing to mention about this menu is that it’s session-based. It isn’t written to the hard drive, and when you log off it’s erased. However, if making sure this menu isn’t available at all is your concern, then read on.

You need to make changes to the file /usr/share/nautilus/ui/nautilus-navigation-window-ui.xml — make a backup of it just in case you break something! So now open the file in an editor or run the following:

sudo gedit /usr/share/nautilus/ui/nautilus-navigation-window-ui.xml

Scroll down to around line 47 and you should see the following:

Delete those three lines. Log out and then back in to see your changes. This will make the change effective for all users.

Questions, comments, and feedback on this are welcome and appreciated!

, ,