Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Linux Forums > Linux - Desktop
User Name
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.


  Search this Thread
Old 06-28-2012, 11:43 AM   #1
LQ Newbie
Registered: Feb 2010
Posts: 8

Rep: Reputation: 1
xfce - howto edit menu or desktop icon to show currently active username


i googled it for hours, read man pages, but did not find any good info about the topic.

I simply want to print the loginname of my currently active "xfce user", somewhere in the menubar(logoff button) or on a launcher icon(desktop) or something like that. But i wan´t this for all Users.

Does someone has an idea?
Old 06-28-2012, 11:55 AM   #2
LQ Addict
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, Slackware Current AMD64, various VMs
Posts: 5,606

Rep: Reputation: 1396Reputation: 1396Reputation: 1396Reputation: 1396Reputation: 1396Reputation: 1396Reputation: 1396Reputation: 1396Reputation: 1396Reputation: 1396
A tricky one that, the only way I can think of off the top of my head is have each user run a script to echo their username to a file then add a "Generic Monitor" that does "cat <usernamefile>".
For some reason, as you have perhaps found out, having "Generic Monitor" running "echo $USER" doesn't work.
Old 06-29-2012, 01:44 AM   #3
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian except for netbook still on Slackware 13.37 (and I have to support Ubuntu)
Posts: 8,573
Blog Entries: 30

Rep: Reputation: 1182Reputation: 1182Reputation: 1182Reputation: 1182Reputation: 1182Reputation: 1182Reputation: 1182Reputation: 1182Reputation: 1182
For the launcher on the desktop
echo "
[Desktop Entry]
Name=User name: $USER
StartupNotify=false" > ~/Desktop/username.desktop
Old 06-29-2012, 06:21 AM   #4
LQ Newbie
Registered: Feb 2010
Posts: 8

Original Poster
Rep: Reputation: 1
Thx much for the replies.

Generating a desktop launcher was also my first guess )
Cause its fairly easy and a quick solution, so thx for the "code".

What catches my eye is, that when i click on logout the username will
be presented, so maybe it is possible to present it also with the
logout button in the menu. Maybe by attaching a Variable in the mainmenu
Old 06-29-2012, 04:22 PM   #5
LQ Newbie
Registered: Feb 2010
Posts: 8

Original Poster
Rep: Reputation: 1
With the help of k0Do from #xfce i could solve the problem, quick and easy.

I installed the genmon-plugin and let it run a simple bash script(echo $USER)
and thats it, the username is displayed in the panel. I will put the script in a
path readable for all users and edit the default panel file etc. to include it
for every new user. I also found out about the xfce kiosk mode, so i will lockup
xfce, so no user could delete the plugins etc.

Thx to k0Do and the posters in this thread.

Last edited by codix; 06-29-2012 at 04:24 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Is there a way to remove a menu icon on an XFCE panel? CGBS Linux - Newbie 1 11-29-2011 03:13 AM
[SOLVED] How to edit the xfce menu? george-lappies Slackware 6 06-09-2011 03:44 AM
Edit XFCE right click menu scubanator87 Linux - Desktop 2 06-03-2010 03:10 PM
Pleez, How do you edit Xfce Application Menu? NightSky Linux - Software 6 02-19-2008 09:58 AM
how to edit xfce menu? kryptobs2000 Linux - Software 7 02-16-2008 10:50 AM

All times are GMT -5. The time now is 07:10 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration