Xfce Forum

Sub domains
 

You are not logged in.

#1 2009-10-31 01:34:10

infinitelink
Member
Registered: 2009-06-21
Posts: 7

Terminal Editing Session and Startup

Hi! big_smile

Anyone know how to edit startup programs/packages, i.e. that which 'Session and Startup' under 'Settings' is used to tweak, using not the gui, but the terminal? And that so if I do go into the gui it will show the results of the terminal editing? (i.e. the icon, name, etc. of that which has been added) I so qualify because I don't want to be using something other than 'Session and Startup', since there are always (it seems) a billion ways of doing something on Linux: in this case I want to stick to the 'official' way, just using the official way through the terminal, not gui.  smile

Help is much appreciated. : )

Offline

#2 2009-10-31 03:13:11

s0ulslack
Moderator
From: Idaho
Registered: 2005-12-25
Posts: 291

Re: Terminal Editing Session and Startup

hah well thats respectable, but your just making things harder on yourself then you actually need to, but to each their own... Session stuff is stored in ~/.cache/sessions/ - the file you'll want to look at should start with something like "xfce4-session-YOURHOSTNAME:0" or similar.

your post is abit confusing though, I understand you wanting to edit Session files by hand but it also sounds like you want to edit Application Entries in the menu too from the way you have things worded.  If so reply back and someone will help.

Offline

#3 2009-10-31 03:18:06

infinitelink
Member
Registered: 2009-06-21
Posts: 7

Re: Terminal Editing Session and Startup

Hey again dude. ; ) No, I don't want to edit the application menu (know that); I just wanted to be sure I wouldn't get instructions to add start-up items in a way that doesn't use 'Session and Startup', because I know there are other ways on Linux to do it (and if anyone says there isn't, we'll all see a /. post of some guy showing-off just to prove the naysayer wrong). I like to keep organized, you know? So I thought specifying the extra detail would be helpful, but realized it might also be confusing. Thanks, though. : )

Time to begin examining that file for how one adds and removes things correctly... : )

Any advice on adding items from the terminal, i.e. lines to the file, without opening it in a text-editor like vi or mousepad?

Offline

#4 2009-10-31 06:49:34

Wapush
Member
Registered: 2006-12-14
Posts: 140

Re: Terminal Editing Session and Startup

infinitelink wrote:

in this case I want to stick to the 'official' way, just using the official way through the terminal, not gui.  smile

The official way with Xfce is to use "Session and Startup" graphically.

But, xfce4-session uses ~/.cache/sessions/ to store a saved session, including the applications which are currently in use, and ~/.config/autostart/ for the applications you choose to be automatically started with each Xfce startup.

So, if your question his how to automatically start an apps using a ".desktop" file (a freedesktop standard) in ~/.config/autostart/ with the terminal, you have the possibility of doing it with exo-desktop-item-edit.

Example with the Midori browser:

exo-desktop-item-edit --create-new --type Application --name midori --command midori --icon midori ~/.config/autostart/

After the creation of the launcher, you will see that your application will have been added to Settings --> Session and Startup --> Application Autostart. man exo-desktop-item-edit for more information.

To remove it:

rm ~/.config/autostart/midori.desktop

The only disadvantage, in my opinion, is that it does not create the launcher (midori.desktop) automatically, but opens a graphical confirmation dialog.

Then, if your question is how to save your session, including the applications which are currently in use, with a command in the terminal, I don't think that it is possible to do it.

Edit: And I agree with s0ulslack that your question is a bit confusing wink

Offline

#5 2009-11-02 16:31:42

infinitelink
Member
Registered: 2009-06-21
Posts: 7

Re: Terminal Editing Session and Startup

I'll try to be clearer: I want to use 'Sessions and Startup', but through the terminal: not graphically; and I want to edit the file upon which the graphical front-end to 'Sessions and Startup' without manually editing it with the terminal, but giving the terminal a command to make the desired changes to that configuration file.

Offline

#6 2009-11-02 23:44:15

s0ulslack
Moderator
From: Idaho
Registered: 2005-12-25
Posts: 291

Re: Terminal Editing Session and Startup

There isn't a tool/cli interface to it, you'll have to edit it manually if needed... which should be rare/if at all most of the time anyways, just use the GUI smile

Offline

Board footer

Powered by FluxBB