Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] start twm from console
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 322
Location: USA

PostPosted: Wed Sep 29, 2021 9:18 pm    Post subject: [SOLVED] start twm from console Reply with quote

I have installed Gentoo "Desktop (stable)", and want to use twm for window manager with X. Basically I want to boot into my home console and use GUI later,

I copied /etc/X11/xinit/xinitrc into ~/.xinitrc (note this is now a dot file) and tweaked it to have my own decoration. startx gets me to my usual twm opening screen. However, the existing ~/.twmrc with my custom menus is not recognized. The ".twmrc" file is from my old desktop that I replace now with a fitlet2 machine running Gentoo.

What is the proper way to start twm from command line with my own screen and menus?


Last edited by jankom on Fri Sep 22, 2023 3:32 pm; edited 1 time in total
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Wed Sep 29, 2021 9:53 pm    Post subject: Reply with quote

You wrote you tweaked your ~/.xinitrc? How do you start twm in that file?

Is it
Code:
twm

or
Code:
twm -f <somefile>

Because if you use the latter, twm won't read ~/.twmrc...
Back to top
View user's profile Send private message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 322
Location: USA

PostPosted: Thu Sep 30, 2021 1:24 am    Post subject: Reply with quote

Thanks for the quick reply. Here is my entire ~/xinitrc: (the commented out source method confused startx and it went back to console)
Code:
#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/Xresources
sysmodmap=/etc/X11/xinit/Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
    xrdb -merge "$userresources"
fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?* ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

twm &
xclock -update 1 -geometry 164x164-0-0 &
xosview -geometry -6+0 +net &
xterm -geometry +504-0 -e mc &
exec xterm -sb -geometry 80x30+0-0 -name login #& source .twmrc
[/b]
Back to top
View user's profile Send private message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 322
Location: USA

PostPosted: Thu Sep 30, 2021 2:17 pm    Post subject: Stupid me Reply with quote

I just realized that the problem was "ownership". Since I copied file .twmrc from my old desktop I had a different "user and group" of the file. After doing "chown" startx starts correctly, including my custom menus.

Sorry for posting my original question.

Case closed.

Janos
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21607

PostPosted: Thu Sep 30, 2021 2:58 pm    Post subject: Reply with quote

Did you find that as a result of a twm error message (and if so, where was the message?) or through general inspection? Even threads caused by user error can be useful if they end with instructions for how future readers can recognize that they have the same problem, and how to fix it.
Back to top
View user's profile Send private message
jankom
Guru
Guru


Joined: 30 Aug 2021
Posts: 322
Location: USA

PostPosted: Thu Sep 30, 2021 7:31 pm    Post subject: Reply with quote

There was no error message. The twm program went according to its design (as I found out later and what led me to the solution) that if it does not find "~/.twmrc" file it looks for something else, and ultimately uses its out-of-the-box default behavior. Actually, the posting by @mike155 was also helpful. because it made me to investigate the .twmrc file itself. The output of the
Code:
ls -iaHl
was the"aha" moment.
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Thu Sep 30, 2021 8:15 pm    Post subject: Reply with quote

I'm glad that you were able to solve the issue.

My next post would have been: please start twm with strace
Code:
strace -o /tmp/strace.log -f twm &

and then grep for "open" in the output:
Code:
grep open /tmp/strace.log

grep lists all the files twm opens. That would have shown us that twm opened your rc file and that (and why) it failed.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum