How to find out user id on linux system

For a mount command I needed to find out what user id my user account had. There are several ways to find out. As root you could look into the passwd file (most likely /etc/passwd) or on OpenSuSE use the Yast user module. But I was looking for a way to find out my user id with my ordinary user account. The command I was looking for is id. Just open up a shell (konsole on KDE4) with your active user, type id and you get all the information about your user including groups and their ids. If you just want to know the user’s id, e.g. for a shell script use

id -u USERNAME

and you get back just the id of the user. Simple as that!

Subscribe to our free RSS feed or get updates by email!


System upgrade openSUSE 11.0 to openSUSE 11.1 with zypper

I had to set up a server. The hoster offers openSUSE 11.0 at the moment but no openSUSE 11.1 yet. As I like to go with the latest and greatest I decided to upgrade the system to openSUSE 11.1 after using the hoster’s installation image for openSUSE 11.0. I searched on the web how a system upgrade should be done this time. (It seems to differ all the time.) I found a zypper command chain. Change the installation reposotories in /etc/zypp/repos.d to the new version and type:

zypper refresh
zypper dist-upgrade

I did excatly that. It did refresh a few packages but as I guessed immediately not enough. I tried over. It did not help. Here is the solution. Delete all subdirectories in /var/cache/zypper and execute the commands above again.


New software packages bundled with OpenSuSE 11.1

The newest version of OpenSuSE got released today. OpenSuSE 11.1 brings more than 230 new features the press release says. As I keep my systems up to date thanks to smart and all the repositories only a number of these new feature are missing on my OpenSuSE 11.0 installations. The most important reason I quickly upgrade my desktop system is KDE. As I am still using KDE version 3 and the version that comes with OpenSuSE 11.1 is the same I have installed (KDE 3.5.10) this does not convince me to upgrade.

I did however discover new software (packages) in OpenSuSE 11.1 I have not known before. These packages are Tasque, Tellico, Twinkle, Monsoon, PulseAudio and Derby. I googled these terms and came up with the following.

Read the rest of this entry »


The open source application stack for Windows

The bad thing with most new computers is that they come with Windows ™ preinstalled. The good thing is those Windows ™ installations don’t bring much (useful) software along. Users have to actively use which software they want to use.

Read the rest of this entry »


ejabberd on GNU/Linux OpenSuSE 11.0

I heard about the successful usage of ejabberd from weblin’s CTO Heiner yesterday at lunch during BarCamp Hamburg 08.

I was thinking of deploying jabber services for podcast.de for a while now but couldn’t decide which server to take. I checked the ejabberd website. The software looks promising. So I give it a try.

smart install ejabberd

Could not find any results. So I check OpenSuSE software search. Luckily it lists a source which I add to my smart sources.

Read the rest of this entry »


Free e-book shellprogramming

I had to write a shell program. And I was looking for a how-to / manual covering my favorites shell command set. I found a nice e-book on Wikibooks: Linux-Kompendium: Shellprogrammierung which helped me a lot. Hence the link for other people.


Apache and lighttpd replaced by nginx for PHP application

A while back I wrote an article Switching from Apache HTTP Server to Lighttpd - Installing Lighttpd. Back then I migrated static stuff to lighttpd but left the dynamic stuff (PHP) with Apache.

I was never really satisfied with the speed of our system under load. I tried and tried. I optimized a lot of stuff in the backend and with the database. Most of the time I found a switch to make the system just a bit faster. Read Retrospective on three years of Seagull development if you are interested in the whole story.

Read the rest of this entry »


Solved: Miro won’t start - missing video directory

A couple of days ago a brand new version of Miro the open video podcatcher was released. I was eager to try it out. It is supposed to be faster than the previous release. I had to wait a few days for a rpm for my linux distribution to be released. Thanks to the great work of the PackMan crew this happended pretty soon after the release. Bummer! Miro won’t start. It seems I cleaned up to good after uninstalling the previous release. Miro complained that the video directory is missing. I checked the Miro Forums but could not find anything related to Linux. There were some tips for Mac OS X but nothing for linux. I checked the source, followed strace, used Google Linux but nothing turned up. I thought the fix would be as easy as finding what directory Miro is looking for. Finding the directory was not easy. I was close to giving up before I tried the unittest switch for Miro.

miro  --unittest

What shall I say? That did the trick! The unittest failed but it created the missing directory (structure):

~/Movies/Democracy/Incomplete Downloads/

Now Miro starts. It still looks like it is not running properly but it is a start.

PS: I use OpenSuSE 10.3 and KDE3.


How to add a custom user-agent string to Konqueror

You can easily set a custom user-agent string for a specific site through a predefined list of user-agent strings. If you want to define your own custom user-agent string I did not find a gui for that. The solution I found is the following. Launch your favorite text editor and open the file

~/.kde/config/kio_httprc

Just add two lines to the file. Here is an example. I wanted Konqueror to identify as an iPhone for m.podcast.de. The original iPhone has the following user-agent string:

Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3

So I added  the following two lines to the file

[m.podcast.de]

Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3

That’s all. Save the file. Relaunch Konqueror and you are done!


DNS does not resolve www.google.com - quick fix

Tags: ,

Surfing the web today and already yesterday in some cases one website wouldn´t load: www.google.com. This makes it difficult to login to Google AdWords and impossible to login to AdSense. For searching I can use the localized version www.google.de. That works just fine. But I use my browser´s (Mozilla Firefox) integrated search box quiet frequently. Using Google there leads to the .com version. www.google.com is working just fine (When did they have their last downtime? Did they ever have one?) so things with the DNS (Domain Name System) could be messed up. The system does not find an ip address for the url www.google.com anymore. The solution could be to set a fixed ip address for the url. This is also good for having local urls, e.g. my.system.

Would you need to do is edit the file /etc/hosts with an editor of your choice. As you need root rights you probably have to do this using a shell. Try vim, joe, emac or whatever you prefer.

Add a line

209.85.135.103 www.google.com

to your hosts file and you are ready to load Google in your browser again.