You are not logged in.

#1 2016-12-01 22:01:12

o9000
tint2 developer
From: Network Neighborhood
Registered: 2015-10-24
Posts: 417
Website

tint2 - should it cd to $HOME when executing external commands?

Currently it does not. If you run tint2 outside the home dir, any programs launched from tint2 will have the current directory in that location. Annoying when starting terminals.

I'm considering changing it, to cd to $HOME. Do you think this is a good idea?

Offline

#2 2016-12-02 01:26:23

cpoakes
Member
Registered: 2016-12-02
Posts: 108

Re: tint2 - should it cd to $HOME when executing external commands?

Hi Ovi,

No. I would rather tint2 make no assumptions about where programs should start (other than the current working directory like every other *nix program). If the user wants all tint2 programs to start with a current working directory of home, it is simply a matter of launching tint2 from home.

cd $HOME; tint2 &

Offline

#3 2016-12-02 08:55:07

o9000
tint2 developer
From: Network Neighborhood
Registered: 2015-10-24
Posts: 417
Website

Re: tint2 - should it cd to $HOME when executing external commands?

I see your point, it's true for most utilities, but not for many long-running programs such as servers and graphical applications that run continuously. For example, openbox also changes directory at startup: https://github.com/danakj/openbox/blob/ … box.c#L136

On the other hand lxpanel does not.

But I think I won't do that, it's easier to fix this with a cd as you say, than guess what might go wrong in some unusual setup.

P.S. Welcome to the bunsenlabs forums smile

Last edited by o9000 (2016-12-02 08:59:05)

Offline

#4 2016-12-02 20:09:13

cpoakes
Member
Registered: 2016-12-02
Posts: 108

Re: tint2 - should it cd to $HOME when executing external commands?

Also, users that wouldn't want $HOME as tint2's current directory would 1) be forced to create a work-around, and 2) bug you to provide yet-another-configuration-parameter to set their preferred directory. Like you say, easiest to manage as it is.

Thanks for all your hard work keeping tint2 current and robust!

Offline

#5 2016-12-03 08:45:08

o9000
tint2 developer
From: Network Neighborhood
Registered: 2015-10-24
Posts: 417
Website

Re: tint2 - should it cd to $HOME when executing external commands?

Thanks for your feedback. It is always reasonable and useful.

Offline

Board footer

Powered by FluxBB