Running AsusLauncher in Advanced mode
#1
Posted 17 December 2007 - 05:20 AM
Steps using file manager
1. Create a folder in home called .AsusLauncher
2. Select simpleui.rc favorites.rc and launcherMode files in /home/user/.AsusLauncher
3. Paste them as links in the .AsusLauncher folder created in step one
The problem is that you can only successfully launch AsusLauncherby opening it from the file manager. I cannot figure out how this works. One thing I tried was create a shortcut (.desktop file) in the kde autostart folder similar to the beryl shortcut. The problem with doing that is it conflicts with KDE and gets stuck in an infinite loop starting window managers (had to delete it by booting into DSL Linux). The last thing I tried is to start AsusLauncher as an argument using the XandrosFileManager from a konsole, but this results in the same window manager infinite loop.
So my question for you whizzes out there is how can i duplicate the way that file manager executes AsusLauncher so that I can get AsusLauncher to startup with KDE?
BTW I think AsusLauncher + KDE + Beryl = gorgeous, though a bit slow
#2
Posted 17 December 2007 - 02:12 PM
Quote
1. Create a folder in home called .AsusLauncher
2. Select simpleui.rc favorites.rc and launcherMode files in /home/user/.AsusLauncher
3. Paste them as links in the .AsusLauncher folder created in step one
I already have an .AsusLauncher folder with a launcherMode file (and a requireLogin file). I found the simpleui.rc file in /opt/xandros/share/AsusLauncher/ directory. Where does the favorites.rc files come from? Or, is this file created when you add favorites to the simple gui? Also, I'm guessing,the link you are referring to is a symbolic link found under the FileManager File menu.
One last question;
Where is the AsusLauncher executable?
You are free to reuse whatever you want to, provided that:
1) you give credit to me and eeeuser.com whenever you reuse anything for all things you reused.
2) you do not pretend or create the illusion that your modifications are mine. I'll be responsible for my junk, you for yours.
#3
Posted 17 December 2007 - 06:38 PM
The AsusLauncher executable is found in /opt/xandros/bin . In file manager it says its an ELF 32-bit executable, not sure what that means, but it seems to up up as non-executable in a regular terminal.
EDIT:
okay, success! I figured this out what was going wrong
here's what you need to do to get it to start at startup
1. create a new startup shortcut with kwrite
sudo kwrite /home/user/.kde/AutoStart/AsusLauncher.desktop
2. use the following as contents
[Desktop Entry] Exec=sudo /opt/xandros/bin/AsusLauncher Name=AsusLauncher StartupNotify=false Terminal=0 Type=Application X-KDE-SubstituteUID=falselooks like the only thing i missed when i first tried it was running it as sudo. if you do not run it as sudo the window manager keeps getting reset and you'll have to boot into another OS to fix the mistake (not fun!). other notes are i turn off startup notify as it's more of a distracting than useful.
Edited by RogueStar, 17 December 2007 - 11:22 PM.
#4
Posted 21 December 2007 - 03:16 AM
When I follow the directions in the wiki I get the following error when I try to save the file:
The document could not be saved, as it was not possible to write to file:///home/user/.kde/AutoStart/AsusLauncher.desktop.
Check that you have write access to this file or that enough disk space is available.
Any idea where I'm going wrong?
#5
Posted 21 December 2007 - 04:20 AM
AutoStart should actually be Autostart
i'll fix it up in the wiki, thanks for pointing it out
#6
Posted 26 December 2007 - 05:35 PM
Have followed the wiki instructions to launch the asus launcher on startup of the advanced mode, but it seems to be behaving strangely. It's almost as if the launcher thinks i'm logged in as a different user to which the KDE thinks I am.
For example... Open Office can't find My Documents when launched from the launcher, but has no problem when launched from the Xandros start menu. Also, the settings I choose in apps launched through the launcher (specifically Opera) aren't saved in instances launched from the main KDE and vica versa.
Looking at the processes of each of 2 instances of Write, one is indeed logged as 'root', the other as 'user'. I'm assuming that's the cause of the behaviour?? Now I know the launcher has to be launched as root, but is there any way to tell it to launch its apps as 'user'?? - I only started using linux as of yesterday when I got this thing, so am fairly green with how it handles users! :)
Would it work if I use the 'X-KDE-Username=' argument in '/home/user/.kde/Autostart/AsusLauncher.desktop' and put my user name of 'Mart' in there?? or 'user'?... don't want to blindly try it for fear of getting into the infinite loop descrbed in the wiki!
Many thanks in advance,
Martin.
#7
Posted 26 December 2007 - 06:31 PM
#8
Posted 26 December 2007 - 06:58 PM
since you are running it as root you are in fact running it as a different user. this is why you have to copy over/link the simpleui.rc file etc. in the wiki. it looks like the solution is to go into /home/user find the .openoffice or whatever folder for the app that is misbehaving and then link it to /root (you'll have to delete the folder in /root if it already exists). i think i will write a script to automate this and then add it to the wiki
though that doesn't seem to fix everything, such as %home being /root instead of /home/user when you browse for files. i think the only thing you can do for now is change the %u argument in the .desktop files to /home/user which is probably more work than its worth, still i'll keep looking for better solutions. its either that or change %HOME from /root to /home/user, which is probably a very bad practice
Edited by RogueStar, 26 December 2007 - 08:39 PM.
#9
Posted 18 February 2008 - 12:04 AM
As RogueStar noted in response to mart123's question, the problem is that the applications all run as root rather than as user. For some applications, this may be OK, but for others it's definitely not.
First, the partial fix: You can edit the simpleui.rc file to run each command explicitly as user rather than as root by adding kdesu -u user -c before each of the affected commands. If the command is followed by parameters that start with a hyphen (-), you have to precede them with two hyphens ( -- ) so that kdesu will pass them through.
For example:
/usr/bin/XandrosFileManager -maximizedbecomes:
/usr/bin/kdesu -u user -c /usr/bin/XandrosFileManager -- -maximizedNow, when you click on the File Manager icon, XandrosFileManager should run as user in user's home directory.
A technical note: /usr/bin/sudo -u user -H doesn't work. The icons disappear if you do that. I assume what's happening is that AsusLauncher expects to see the command name immediately after sudo. I'm guessing that if it sees a parm like -u instead, it thinks the relevant command isn't installed, so it doesn't display the icon. There may be other ways to do the same thing, but I haven't tried them since kdesu seems to work just fine. (Some possible ideas: create a symlink to sudo that's named something other than sudo, or use a script to run sudo, or use a setuid script to run the underlying command.) Also note that su -l user -c doesn't work, for different reasons.
Finally, my question: Can anyone think of a way to make this work for entries of the form shortcut="/opt/firefox/firefox.desktop" other than editing each *.desktop file individually, and other than replacing all the .desktop references in simpleui.rc with calls to the underlying commands? For example, is there a command that can be invoked that will run a desktop entry file?
Edited by Onionald, 18 February 2008 - 03:57 AM.
#10
Posted 19 April 2008 - 04:39 AM
It's not pretty. I've added instructions to the wiki.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












