LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

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

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


Hi,

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
273
Senior Member
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 3,325

Rep: Reputation: 772Reputation: 772Reputation: 772Reputation: 772Reputation: 772Reputation: 772Reputation: 772
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
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,533
Blog Entries: 28

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
For the launcher on the desktop
Code:
echo "
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Type=Application
Name=User name: $USER
Comment=
Categories=Application;
Exec=
Icon=
Terminal=false
StartupNotify=false" > ~/Desktop/username.desktop
 
Old 06-29-2012, 06:21 AM   #4
codix
LQ Newbie
 
Registered: Feb 2010
Posts: 8

Original Poster
Rep: Reputation: 0
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
file.
 
Old 06-29-2012, 04:22 PM   #5
codix
LQ Newbie
 
Registered: Feb 2010
Posts: 8

Original Poster
Rep: Reputation: 0
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.
 
  


Reply


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 04:05 PM.

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