Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
   Glossary   Glossary
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Author Topic: Forwarding X  (Read 2887 times)

tickmike

  • Kitizen
  • ****
  • Posts: 3640
  • Yes Another Penguin !. :)
Forwarding X
« on: September 02, 2014, 02:25:19 PM »

I have a program that runs under root and I want to let a user know when it's running with a user tray icon so they wait until it's finished before shutting down.

 I added this.

 Edit the file /etc/profile and add the line:

export XAUTHORITY=/home/USERNAME/.Xauthority

replace USERNAME with the non-root username that logs-in

But it did not work.
Logged
I have a set of 6 fixed IP's From  Eclipse  isp.BT ADSL2(G992.3) line>HG612 as a Modem, Bridge, WAN Not Bound to LAN1 or 2 + Also have FTTP (G.984) No One isp Fixed IP >Dual WAN pfSense (Hardware Firewall and routing).> Two WAN's, Ethernet LAN, DMZ LAN, Zyxel GS1100-24 Switch.

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43573
  • Penguins CAN fly
    • DSLstats
Re: Forwarding X
« Reply #1 on: September 02, 2014, 03:24:43 PM »

Out of curiosity I just tried launching DSLstats as root by using kdesu:

Code: [Select]
/usr/lib/kde4/libexec/kdesu .../dslstats
This did create a tray entry which worked when I clicked on it, but it didn't show an icon in it. Is this the issue you're trying to solve? I'm not sure that forwarding the user's .Xauthority to the system default will work.
Logged
  Eric

tickmike

  • Kitizen
  • ****
  • Posts: 3640
  • Yes Another Penguin !. :)
Re: Forwarding X
« Reply #2 on: September 02, 2014, 03:48:36 PM »

It's the automatic backup system I have running on my daughters uni laptop, it runs under 'super user' but in the users settings it does not indicate when its running.
Logged
I have a set of 6 fixed IP's From  Eclipse  isp.BT ADSL2(G992.3) line>HG612 as a Modem, Bridge, WAN Not Bound to LAN1 or 2 + Also have FTTP (G.984) No One isp Fixed IP >Dual WAN pfSense (Hardware Firewall and routing).> Two WAN's, Ethernet LAN, DMZ LAN, Zyxel GS1100-24 Switch.

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 43573
  • Penguins CAN fly
    • DSLstats
Re: Forwarding X
« Reply #3 on: September 02, 2014, 04:15:42 PM »

It's easy to check if a particular process is running. In a terminal, type "ps -e | grep <executable name>". This lists processes started by all users on the system. Perhaps you could make use of this?
Logged
  Eric

tickmike

  • Kitizen
  • ****
  • Posts: 3640
  • Yes Another Penguin !. :)
Re: Forwarding X
« Reply #4 on: September 03, 2014, 03:27:14 PM »

This works   Edit the file    /etc/profile    and add the line:
 xhost +si:localuser:root
at the end, save, re-boot, run backup system = icon for the user to see.

Not sure if this causes security holes . :hmm:


http://linux.die.net/man/1/xhost
http://linux.die.net/man/7/xsecurity
Logged
I have a set of 6 fixed IP's From  Eclipse  isp.BT ADSL2(G992.3) line>HG612 as a Modem, Bridge, WAN Not Bound to LAN1 or 2 + Also have FTTP (G.984) No One isp Fixed IP >Dual WAN pfSense (Hardware Firewall and routing).> Two WAN's, Ethernet LAN, DMZ LAN, Zyxel GS1100-24 Switch.